home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Warrior’s Progress / source code / Source / Libraries / Drawing / ScreenLoop.cp < prev    next >
Encoding:
Text File  |  1997-06-28  |  323 b   |  24 lines  |  [TEXT/CWIE]

  1. // ScreenLoop.cp
  2.  
  3. #ifndef ScreenLoop_h
  4. #include "ScreenLoop.h"
  5. #endif
  6.  
  7. ScreenLoop::ScreenLoop()
  8.   {
  9.     Advance();
  10.   }
  11.  
  12. void ScreenLoop::operator++()
  13.   {
  14.     device++;
  15.     Advance();
  16.   }
  17.  
  18. void ScreenLoop::Advance()
  19.   {
  20.     for ( ; device.Unfinished(); device++ )
  21.         if ( (*device).ScreenActive() && (*device).IsScreen() )
  22.             break;
  23.   }
  24.